home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / CMICCProfile.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  30.4 KB  |  767 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMICCProfile.a
  3. ;
  4. ;    Contains:    ICC Profile Format Definitions
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  18. __CMICCPROFILE__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.  
  24. ;  Current CMProfile.header.profileVersion Major: 2, Minor: 0, Stage: Developement (x20), Prerelease:0x01 
  25.  
  26. cmCS2ProfileVersion                EQU        $02000000
  27. ;  Current Major version number 
  28.  
  29. cmCurrentProfileMajorVersion    EQU        $02000000
  30. ;  magic cookie number for anonymous file ID 
  31.  
  32. cmMagicNumber                    EQU        'acsp'
  33. ;  ColorSync profile version 1.0 
  34.  
  35. cmCS1ProfileVersion                EQU        $00000100
  36.  
  37. ; ***********************************************************************
  38. ; *************** ColorSync 2.0 profile specification *******************
  39. ; ***********************************************************************
  40. ; *** flags field  ***
  41.  
  42. cmICCReservedFlagsMask            EQU        $0000FFFF            ; these bits of the flags field are defined and reserved by ICC 
  43. cmEmbeddedMask                    EQU        $00000001            ; if bit 0 is 0 then not embedded profile, if 1 then embedded profile 
  44. cmEmbeddedUseMask                EQU        $00000002            ; if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only 
  45. cmCMSReservedFlagsMask            EQU        $FFFF0000            ; these bits of the flags field are defined and reserved by CMS vendor 
  46. cmQualityMask                    EQU        $00030000            ; if bits 16-17 is 0 then normal, if 1 then draft, if 2 then best 
  47. cmInterpolationMask                EQU        $00040000            ; if bit 18 is 0 then interpolation, if 1 then lookup only 
  48. cmGamutCheckingMask                EQU        $00080000            ; if bit 19 is 0 then create gamut checking info, if 1 then no gamut checking info 
  49. ;  copyright-protection flag options 
  50.  
  51. cmEmbeddedProfile                EQU        0                    ; 0 is not embedded profile, 1 is embedded profile 
  52. cmEmbeddedUse                    EQU        1                    ; 0 is to use anywhere, 1 is to use as embedded profile only 
  53. ;  speed and quality flag options 
  54.  
  55. cmNormalMode                    EQU        0                    ; it uses the least significent two bits in the high word of flag 
  56. cmDraftMode                        EQU        1                    ; it should be evaulated like this: right shift 16 bits first, mask off the 
  57. cmBestMode                        EQU        2                    ; high 14 bits, and then compare with the enum to determine the option value 
  58.  
  59. ; *** deviceAttributes fields ***
  60.  
  61. cmICCReservedAttr0Mask            EQU        $0000FFFF            ; these bits of the deviceAttributes[0] field are defined and reserved by ICC 
  62. cmReflectiveTransparentMask        EQU        $00000001            ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  63. cmGlossyMatteMask                EQU        $00000002            ; if bit 1 is 0 then glossy, if 1 then matte 
  64. cmVendorReservedAttr0Mask        EQU        $FFFF0000            ; these bits of the deviceAttributes[0] field are defined and reserved by device vendor 
  65. cmVendorReservedAttr1Mask        EQU        $FFFFFFFF            ; these bits of the deviceAttributes[1] field are defined and reserved by device vendor 
  66. ;  device/media attributes element values  
  67.  
  68. cmReflective                    EQU        0                    ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  69. cmGlossy                        EQU        1                    ; if bit 1 is 0 then glossy, if 1 then matte 
  70.  
  71. ; *** renderingIntent field ***
  72.  
  73. cmPerceptual                    EQU        0                    ; Photographic images 
  74. cmRelativeColorimetric            EQU        1                    ; Logo Colors 
  75. cmSaturation                    EQU        2                    ; Business graphics 
  76. cmAbsoluteColorimetric            EQU        3                    ; Logo Colors 
  77.  
  78.  
  79. ;  data type element values 
  80.  
  81. cmAsciiData                        EQU        0
  82. cmBinaryData                    EQU        1
  83. ;  screen encodings  
  84.  
  85. cmPrtrDefaultScreens            EQU        0                    ; Use printer default screens.  0 is false, 1 is ture 
  86. cmLinesPer                        EQU        1                    ; 0 is LinesPerCm, 1 is LinesPerInch 
  87. ;  2.0 tag type information 
  88.  
  89. cmNumHeaderElements                EQU        10
  90. ;  public tags 
  91.  
  92. cmAToB0Tag                        EQU        'A2B0'
  93. cmAToB1Tag                        EQU        'A2B1'
  94. cmAToB2Tag                        EQU        'A2B2'
  95. cmBlueColorantTag                EQU        'bXYZ'
  96. cmBlueTRCTag                    EQU        'bTRC'
  97. cmBToA0Tag                        EQU        'B2A0'
  98. cmBToA1Tag                        EQU        'B2A1'
  99. cmBToA2Tag                        EQU        'B2A2'
  100. cmCalibrationDateTimeTag        EQU        'calt'
  101. cmCharTargetTag                    EQU        'targ'
  102. cmCopyrightTag                    EQU        'cprt'
  103. cmDeviceMfgDescTag                EQU        'dmnd'
  104. cmDeviceModelDescTag            EQU        'dmdd'
  105. cmGamutTag                        EQU        'gamt'
  106. cmGrayTRCTag                    EQU        'kTRC'
  107. cmGreenColorantTag                EQU        'gXYZ'
  108. cmGreenTRCTag                    EQU        'gTRC'
  109. cmLuminanceTag                    EQU        'lumi'
  110. cmMeasurementTag                EQU        'meas'
  111. cmMediaBlackPointTag            EQU        'bkpt'
  112. cmMediaWhitePointTag            EQU        'wtpt'
  113. cmNamedColorTag                    EQU        'ncol'
  114. cmNamedColor2Tag                EQU        'ncl2'
  115. cmPreview0Tag                    EQU        'pre0'
  116. cmPreview1Tag                    EQU        'pre1'
  117. cmPreview2Tag                    EQU        'pre2'
  118. cmProfileDescriptionTag            EQU        'desc'
  119. cmProfileSequenceDescTag        EQU        'pseq'
  120. cmPS2CRD0Tag                    EQU        'psd0'
  121. cmPS2CRD1Tag                    EQU        'psd1'
  122. cmPS2CRD2Tag                    EQU        'psd2'
  123. cmPS2CRD3Tag                    EQU        'psd3'
  124. cmPS2CSATag                        EQU        'ps2s'
  125. cmPS2RenderingIntentTag            EQU        'ps2i'
  126. cmRedColorantTag                EQU        'rXYZ'
  127. cmRedTRCTag                        EQU        'rTRC'
  128. cmScreeningDescTag                EQU        'scrd'
  129. cmScreeningTag                    EQU        'scrn'
  130. cmTechnologyTag                    EQU        'tech'
  131. cmUcrBgTag                        EQU        'bfd '
  132. cmViewingConditionsDescTag        EQU        'vued'
  133. cmViewingConditionsTag            EQU        'view'
  134. ;  custom tags 
  135.  
  136. cmPS2CRDVMSizeTag                EQU        'psvm'
  137. cmVideoCardGammaTag                EQU        'vcgt'
  138. ;  technology tag descriptions 
  139.  
  140. cmTechnologyFilmScanner            EQU        'fscn'
  141. cmTechnologyReflectiveScanner    EQU        'rscn'
  142. cmTechnologyInkJetPrinter        EQU        'ijet'
  143. cmTechnologyThermalWaxPrinter    EQU        'twax'
  144. cmTechnologyElectrophotographicPrinter EQU 'epho'
  145. cmTechnologyElectrostaticPrinter EQU    'esta'
  146. cmTechnologyDyeSublimationPrinter EQU    'dsub'
  147. cmTechnologyPhotographicPaperPrinter EQU 'rpho'
  148. cmTechnologyFilmWriter            EQU        'fprn'
  149. cmTechnologyVideoMonitor        EQU        'vidm'
  150. cmTechnologyVideoCamera            EQU        'vidc'
  151. cmTechnologyProjectionTelevision EQU    'pjtv'
  152. cmTechnologyCRTDisplay            EQU        'CRT '
  153. cmTechnologyPMDisplay            EQU        'PMD '
  154. cmTechnologyAMDisplay            EQU        'AMD '
  155. cmTechnologyPhotoCD                EQU        'KPCD'
  156. cmTechnologyPhotoImageSetter    EQU        'imgs'
  157. cmTechnologyGravure                EQU        'grav'
  158. cmTechnologyOffsetLithography    EQU        'offs'
  159. cmTechnologySilkscreen            EQU        'silk'
  160. cmTechnologyFlexography            EQU        'flex'
  161. ;  public type signatures 
  162.  
  163. cmSigCurveType                    EQU        'curv'
  164. cmSigDataType                    EQU        'data'
  165. cmSigDateTimeType                EQU        'dtim'
  166. cmSigLut16Type                    EQU        'mft2'
  167. cmSigLut8Type                    EQU        'mft1'
  168. cmSigMeasurementType            EQU        'meas'
  169. cmSigNamedColorType                EQU        'ncol'
  170. cmSigNamedColor2Type            EQU        'ncl2'
  171. cmSigProfileDescriptionType        EQU        'desc'
  172. cmSigScreeningType                EQU        'scrn'
  173. cmSigS15Fixed16Type                EQU        'sf32'
  174. cmSigSignatureType                EQU        'sig '
  175. cmSigTextType                    EQU        'text'
  176. cmSigU16Fixed16Type                EQU        'uf32'
  177. cmSigU1Fixed15Type                EQU        'uf16'
  178. cmSigUInt32Type                    EQU        'ui32'
  179. cmSigUInt64Type                    EQU        'ui64'
  180. cmSigUInt8Type                    EQU        'ui08'
  181. cmSigViewingConditionsType        EQU        'view'
  182. cmSigXYZType                    EQU        'XYZ '
  183. ;  custom type signatures 
  184.  
  185. cmSigVideoCardGammaType            EQU        'vcgt'
  186.  
  187. ;  Measurement type encodings 
  188. ;  Measurement Flare 
  189.  
  190. cmFlare0                        EQU        $00000000
  191. cmFlare100                        EQU        $00000001
  192. ;  Measurement Geometry    
  193.  
  194. cmGeometryUnknown                EQU        $00000000
  195. cmGeometry045or450                EQU        $00000001
  196. cmGeometry0dord0                EQU        $00000002
  197. ;  Standard Observer    
  198.  
  199. cmStdobsUnknown                    EQU        $00000000
  200. cmStdobs1931TwoDegrees            EQU        $00000001
  201. cmStdobs1964TenDegrees            EQU        $00000002
  202. ;  Standard Illuminant 
  203.  
  204. cmIlluminantUnknown                EQU        $00000000
  205. cmIlluminantD50                    EQU        $00000001
  206. cmIlluminantD65                    EQU        $00000002
  207. cmIlluminantD93                    EQU        $00000003
  208. cmIlluminantF2                    EQU        $00000004
  209. cmIlluminantD55                    EQU        $00000005
  210. cmIlluminantA                    EQU        $00000006
  211. cmIlluminantEquiPower            EQU        $00000007
  212. cmIlluminantF8                    EQU        $00000008
  213. ;  Spot Function Value 
  214.  
  215. cmSpotFunctionUnknown            EQU        0
  216. cmSpotFunctionDefault            EQU        1
  217. cmSpotFunctionRound                EQU        2
  218. cmSpotFunctionDiamond            EQU        3
  219. cmSpotFunctionEllipse            EQU        4
  220. cmSpotFunctionLine                EQU        5
  221. cmSpotFunctionSquare            EQU        6
  222. cmSpotFunctionCross                EQU        7
  223. ;  Color Space Signatures 
  224.  
  225. cmXYZData                        EQU        'XYZ '
  226. cmLabData                        EQU        'Lab '
  227. cmLuvData                        EQU        'Luv '
  228. cmYxyData                        EQU        'Yxy '
  229. cmRGBData                        EQU        'RGB '
  230. cmGrayData                        EQU        'GRAY'
  231. cmHSVData                        EQU        'HSV '
  232. cmHLSData                        EQU        'HLS '
  233. cmCMYKData                        EQU        'CMYK'
  234. cmCMYData                        EQU        'CMY '
  235. cmMCH5Data                        EQU        'MCH5'
  236. cmMCH6Data                        EQU        'MCH6'
  237. cmMCH7Data                        EQU        'MCH7'
  238. cmMCH8Data                        EQU        'MCH8'
  239. cmNamedData                        EQU        'NAME'
  240. ;  profileClass enumerations 
  241.  
  242. cmInputClass                    EQU        'scnr'
  243. cmDisplayClass                    EQU        'mntr'
  244. cmOutputClass                    EQU        'prtr'
  245. cmLinkClass                        EQU        'link'
  246. cmAbstractClass                    EQU        'abst'
  247. cmColorSpaceClass                EQU        'spac'
  248. cmNamedColorClass                EQU        'nmcl'
  249. ;  platform enumerations 
  250.  
  251. cmMacintosh                        EQU        'APPL'
  252. cmMicrosoft                        EQU        'MSFT'
  253. cmSolaris                        EQU        'SUNW'
  254. cmSiliconGraphics                EQU        'SGI '
  255. cmTaligent                        EQU        'TGNT'
  256. ;  ColorSync 1.0 elements 
  257.  
  258. cmCS1ChromTag                    EQU        'chrm'
  259. cmCS1TRCTag                        EQU        'trc '
  260. cmCS1NameTag                    EQU        'name'
  261. cmCS1CustTag                    EQU        'cust'
  262. ;  General element data types 
  263. CMDateTime                RECORD 0
  264. year                     ds.w    1                ; offset: $0 (0)
  265. month                     ds.w    1                ; offset: $2 (2)
  266. dayOfTheMonth             ds.w    1                ; offset: $4 (4)
  267. hours                     ds.w    1                ; offset: $6 (6)
  268. minutes                     ds.w    1                ; offset: $8 (8)
  269. seconds                     ds.w    1                ; offset: $A (10)
  270. sizeof                     EQU *                    ; size:   $C (12)
  271.                         ENDR
  272. CMFixedXYZColor            RECORD 0
  273. X                         ds.l    1                ; offset: $0 (0)
  274. Y                         ds.l    1                ; offset: $4 (4)
  275. Z                         ds.l    1                ; offset: $8 (8)
  276. sizeof                     EQU *                    ; size:   $C (12)
  277.                         ENDR
  278. ; typedef unsigned short                 CMXYZComponent
  279.  
  280. CMXYZColor                RECORD 0
  281. X                         ds.w    1                ; offset: $0 (0)
  282. Y                         ds.w    1                ; offset: $2 (2)
  283. Z                         ds.w    1                ; offset: $4 (4)
  284. sizeof                     EQU *                    ; size:   $6 (6)
  285.                         ENDR
  286. CM2Header                RECORD 0
  287. size                     ds.l    1                ; offset: $0 (0)        ;  This is the total size of the Profile 
  288. CMMType                     ds.l    1                ; offset: $4 (4)        ;  CMM signature,  Registered with CS2 consortium  
  289. profileVersion             ds.l    1                ; offset: $8 (8)        ;  Version of CMProfile format 
  290. profileClass             ds.l    1                ; offset: $C (12)        ;  input, display, output, devicelink, abstract, or color conversion profile type 
  291. dataColorSpace             ds.l    1                ; offset: $10 (16)        ;  color space of data 
  292. profileConnectionSpace     ds.l    1                ; offset: $14 (20)        ;  profile connection color space 
  293. dateTime                 ds        CMDateTime        ; offset: $18 (24)        ;  date and time of profile creation 
  294. CS2profileSignature         ds.l    1                ; offset: $24 (36)        ;  'acsp' constant ColorSync 2.0 file ID 
  295. platform                 ds.l    1                ; offset: $28 (40)        ;  primary profile platform, Registered with CS2 consortium 
  296. flags                     ds.l    1                ; offset: $2C (44)        ;  profile flags 
  297. deviceManufacturer         ds.l    1                ; offset: $30 (48)        ;  Registered with ICC consortium 
  298. deviceModel                 ds.l    1                ; offset: $34 (52)        ;  Registered with ICC consortium 
  299. deviceAttributes         ds.l    2                ; offset: $38 (56)        ;  Attributes like paper type 
  300. renderingIntent             ds.l    1                ; offset: $40 (64)        ;  preferred rendering intent of tagged object 
  301. white                     ds        CMFixedXYZColor ; offset: $44 (68)        ;  profile illuminant 
  302. creator                     ds.l    1                ; offset: $50 (80)        ;  profile creator 
  303. reserved                 ds.b    44                ; offset: $54 (84)        ;  reserved for future use 
  304. sizeof                     EQU *                    ; size:   $80 (128)
  305.                         ENDR
  306. CMTagRecord                RECORD 0
  307. tag                         ds.l    1                ; offset: $0 (0)        ;  Registered with CS2 consortium 
  308. elementOffset             ds.l    1                ; offset: $4 (4)        ;  Relative to start of CMProfile 
  309. elementSize                 ds.l    1                ; offset: $8 (8)
  310. sizeof                     EQU *                    ; size:   $C (12)
  311.                         ENDR
  312. CMTagElemTable            RECORD 0
  313. count                     ds.l    1                ; offset: $0 (0)
  314. tagList                     ds        CMTagRecord        ; offset: $4 (4) <-- really an array of length one ;  Variable size 
  315. sizeof                     EQU *                    ; size:   $10 (16)
  316.                         ENDR
  317. ;  External 0x02002001 CMProfile 
  318. CM2Profile                RECORD 0
  319. header                     ds        CM2Header        ; offset: $0 (0)
  320. tagTable                 ds        CMTagElemTable ; offset: $80 (128)
  321. elemData                 ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  Tagged element storage. Variable size 
  322.                          ORG 146
  323. sizeof                     EQU *                    ; size:   $92 (146)
  324.                         ENDR
  325. ; typedef struct CM2Profile *            CM2ProfilePtr
  326.  
  327. ; typedef CM2ProfilePtr *                CM2ProfileHandle
  328.  
  329. ;  Tag Type Definitions 
  330. CMCurveType                RECORD 0
  331. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'curv' 
  332. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  333. countValue                 ds.l    1                ; offset: $8 (8)        ;  number of entries in table that follows 
  334. data                     ds.w    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  335. sizeof                     EQU *                    ; size:   $E (14)
  336.                         ENDR
  337. CMDataType                RECORD 0
  338. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'data' 
  339. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  340. dataFlag                 ds.l    1                ; offset: $8 (8)        ;  0 = ASCII, 1 = binary 
  341. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  342.                          ORG 14
  343. sizeof                     EQU *                    ; size:   $E (14)
  344.                         ENDR
  345. CMDateTimeType            RECORD 0
  346. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'dtim' 
  347. reserved                 ds.l    1                ; offset: $4 (4)
  348. dateTime                 ds        CMDateTime        ; offset: $8 (8)
  349. sizeof                     EQU *                    ; size:   $14 (20)
  350.                         ENDR
  351. CMLut16Type                RECORD 0
  352. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft2' 
  353. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  354. inputChannels             ds.b    1                ; offset: $8 (8)        ;  Number of input channels 
  355. outputChannels             ds.b    1                ; offset: $9 (9)        ;  Number of output channels 
  356. gridPoints                 ds.b    1                ; offset: $A (10)        ;  Number of clutTable grid points 
  357. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  358. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  359. inputTableEntries         ds.w    1                ; offset: $30 (48)        ;  
  360. outputTableEntries         ds.w    1                ; offset: $32 (50)        ;  
  361. inputTable                 ds.w    1                ; offset: $34 (52) <-- really an array of length one ;  Variable size 
  362. CLUT                     ds.w    1                ; offset: $36 (54) <-- really an array of length one ;  Variable size 
  363. outputTable                 ds.w    1                ; offset: $38 (56) <-- really an array of length one ;  Variable size 
  364. sizeof                     EQU *                    ; size:   $3A (58)
  365.                         ENDR
  366. CMLut8Type                RECORD 0
  367. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft1' 
  368. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  369. inputChannels             ds.b    1                ; offset: $8 (8)        ;  
  370. outputChannels             ds.b    1                ; offset: $9 (9)        ;  
  371. gridPoints                 ds.b    1                ; offset: $A (10)        ;  
  372. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  373. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  374. inputTable                 ds.b    256                ; offset: $30 (48)        ;  fixed size of 256 
  375. CLUT                     ds.b    2                ; offset: $130 (304)    ;  Variable size 
  376. outputTable                 ds.b    256                ; offset: $132 (306)    ;  fixed size of 256 
  377. sizeof                     EQU *                    ; size:   $232 (562)
  378.                         ENDR
  379. CMMeasurementType        RECORD 0
  380. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'meas' 
  381. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  382. standardObserver         ds.l    1                ; offset: $8 (8)        ;  0 : unknown, 1 : CIE 1931, 2 : CIE 1964 
  383. backingXYZ                 ds        CMFixedXYZColor ; offset: $C (12)        ;  absolute XYZ values of backing 
  384. geometry                 ds.l    1                ; offset: $18 (24)        ;  0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0 
  385. flare                     ds.l    1                ; offset: $1C (28)        ;  0 : 0%, 1 : 100% flare 
  386. illuminant                 ds.l    1                ; offset: $20 (32)        ;  standard illuminant 
  387. sizeof                     EQU *                    ; size:   $24 (36)
  388.                         ENDR
  389. CMNamedColorType        RECORD 0
  390. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncol' 
  391. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  392. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  
  393. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  394. prefixName                 ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  Variable size, max = 32, to access fields after this one, have to count bytes 
  395. suffixName                 ds.b    1                ; offset: $11 (17) <-- really an array of length one ;  Variable size, max = 32 
  396. data                     ds.b    1                ; offset: $12 (18) <-- really an array of length one ;  varaible size data as explained below 
  397.                          ORG 20
  398. sizeof                     EQU *                    ; size:   $14 (20)
  399.                         ENDR
  400. ;     
  401. ;    A variable size array of structs appears as the last block of data
  402. ;    in the above struct, CMNamedColorType.  The data structure
  403. ;    is as follows: (example in C)
  404. ;    
  405. ;    struct {                                             
  406. ;        unsigned char    rootName[1];                 * Variable size, max = 32 
  407. ;        unsigned char    colorCoords[1];                 * Variable size  
  408. ;    } colorName[1];                                     * Variable size  
  409. ;
  410.  
  411. CMNamedColor2Type        RECORD 0
  412. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncl2' 
  413. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  414. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  lower 16 bits reserved for ICC use 
  415. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  416. deviceChannelCount         ds.l    1                ; offset: $10 (16)        ;  number of device channels, 0 indicates no device value available 
  417. prefixName                 ds.b    32                ; offset: $14 (20)        ;  32 byte field.  7 bit ASCII null terminated 
  418. suffixName                 ds.b    32                ; offset: $34 (52)        ;  32 byte field.  7 bit ASCII null terminated 
  419. data                     ds.b    1                ; offset: $54 (84) <-- really an array of length one ;  varaible size data as explained below 
  420.                          ORG 86
  421. sizeof                     EQU *                    ; size:   $56 (86)
  422.                         ENDR
  423. ;     
  424. ;    A variable size array of structs appears as the last block of data
  425. ;    in the above struct, CMNamedColor2Type.  The data structure
  426. ;    is as follows: (example in C)
  427. ;    
  428. ;    struct {                                             
  429. ;        unsigned char    rootName[1];                 * 32 byte field.  7 bit ASCII null terminated
  430. ;        unsigned char    PCSColorCoords[1];             * Variable size  
  431. ;        unsigned char    DeviceColorCoords[1];         * Variable size  
  432. ;    } colorName2[1];                                 * Variable size  
  433. ;
  434.  
  435.  
  436. CMTextDescriptionType    RECORD 0
  437. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'desc' 
  438. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  439. ASCIICount                 ds.l    1                ; offset: $8 (8)        ;  the count of "bytes" 
  440. ASCIIName                 ds.b    2                ; offset: $C (12)        ;  Variable size, to access fields after this one, have to count bytes 
  441. UniCodeCode                 ds.l    1                ; offset: $E (14)
  442. UniCodeCount             ds.l    1                ; offset: $12 (18)        ;  the count of characters, each character has two bytes 
  443. UniCodeName                 ds.b    2                ; offset: $16 (22)        ;  Variable size 
  444. ScriptCodeCode             ds.w    1                ; offset: $18 (24)
  445. ScriptCodeCount             ds.b    1                ; offset: $1A (26)        ;  the count of "bytes" 
  446.                          ORG 28
  447. ScriptCodeName             ds.b    2                ; offset: $1C (28)        ;  Variable size 
  448. sizeof                     EQU *                    ; size:   $1E (30)
  449.                         ENDR
  450. CMTextType                RECORD 0
  451. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'text' 
  452. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  453. text                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  count of text is obtained from tag size element 
  454.                          ORG 10
  455. sizeof                     EQU *                    ; size:   $A (10)
  456.                         ENDR
  457. CMScreeningType            RECORD 0
  458. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'scrn' 
  459. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  460. screeningFlag             ds.l    1                ; offset: $8 (8)        ;  bit 0 : use printer default screens, bit 1 : inch/cm 
  461. channelCount             ds.l    1                ; offset: $C (12)
  462. data                     ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  varaible size data as explained below 
  463.                          ORG 18
  464. sizeof                     EQU *                    ; size:   $12 (18)
  465.                         ENDR
  466. ;    A variable size array of structs appears as the last block of data
  467. ;    in the above struct, CMScreeningType.  The data structure
  468. ;    is as follows: (example in C)
  469. ;    
  470. ;    struct {
  471. ;        Fixed            frequency;
  472. ;        Fixed            angle;
  473. ;        unsigned long    sportFunction;
  474. ;     }    channelScreening[1];                        * Variable size 
  475. ;
  476.  
  477. CMSignatureType            RECORD 0
  478. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sig ' 
  479. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  480. signature                 ds.l    1                ; offset: $8 (8)
  481. sizeof                     EQU *                    ; size:   $C (12)
  482.                         ENDR
  483. CMS15Fixed16ArrayType    RECORD 0
  484. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sf32' 
  485. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  486. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  487. sizeof                     EQU *                    ; size:   $C (12)
  488.                         ENDR
  489. CMU16Fixed16ArrayType    RECORD 0
  490. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'uf32' 
  491. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  492. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  493. sizeof                     EQU *                    ; size:   $C (12)
  494.                         ENDR
  495. CMUInt16ArrayType        RECORD 0
  496. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui16' 
  497. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  498. value                     ds.w    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  499. sizeof                     EQU *                    ; size:   $A (10)
  500.                         ENDR
  501. CMUInt32ArrayType        RECORD 0
  502. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui32' 
  503. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  504. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  505. sizeof                     EQU *                    ; size:   $C (12)
  506.                         ENDR
  507. CMUInt64ArrayType        RECORD 0
  508. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui64' 
  509. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  510. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size (x2) 
  511. sizeof                     EQU *                    ; size:   $C (12)
  512.                         ENDR
  513. CMUInt8ArrayType        RECORD 0
  514. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui08' 
  515. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  516. value                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  517.                          ORG 10
  518. sizeof                     EQU *                    ; size:   $A (10)
  519.                         ENDR
  520. CMViewingConditionsType    RECORD 0
  521. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'view' 
  522. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  523. illuminant                 ds        CMFixedXYZColor ; offset: $8 (8)        ;  absolute XYZs of illuminant  in cd/m^2 
  524. surround                 ds        CMFixedXYZColor ; offset: $14 (20)        ;  absolute XYZs of surround in cd/m^2 
  525. stdIlluminant             ds.l    1                ; offset: $20 (32)        ;  see definitions of std illuminants 
  526. sizeof                     EQU *                    ; size:   $24 (36)
  527.                         ENDR
  528. CMXYZType                RECORD 0
  529. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'XYZ ' 
  530. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  531. XYZ                         ds        CMFixedXYZColor ; offset: $8 (8) <-- really an array of length one ;  variable size XYZ tristimulus values 
  532. sizeof                     EQU *                    ; size:   $14 (20)
  533.                         ENDR
  534. ;  Profile sequence description type 
  535. CMProfileSequenceDescType RECORD 0
  536. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'pseq ' 
  537. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  538. count                     ds.l    1                ; offset: $8 (8)        ;  Number of descriptions 
  539. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  varaible size data as explained below 
  540.                          ORG 14
  541. sizeof                     EQU *                    ; size:   $E (14)
  542.                         ENDR
  543. ;    A variable size array of structs appears as the last block of data
  544. ;    in the above struct, CMProfileSequenceDescType.  The data structure
  545. ;    is as follows: (example in C)
  546. ;    
  547. ;    struct {                                             
  548. ;        OSType            deviceMfg;                     * Device Manufacturer 
  549. ;        OSType            deviceModel;                 * Decvice Model 
  550. ;        unsigned long    attributes[2];                 * Device attributes 
  551. ;        OSType            technology;                     * Technology signature 
  552. ;        unsigned long    mfgDescASCIICount;             * the count of "bytes" 
  553. ;        unsigned char    mfgDescASCIIName[2];         * Variable size 
  554. ;        unsigned long    mfgDescUniCodeCode;             
  555. ;        unsigned long    mfgDescUniCodeCount;         * the count of characters, each character has two bytes 
  556. ;        unsigned char    mfgDescUniCodeName[2];         * Variable size 
  557. ;        unsigned long    mfgDescScriptCodeCode;         
  558. ;        unsigned long    mfgDescScriptCodeCount;         * the count of "bytes" 
  559. ;        unsigned char    mfgDescScriptCodeName[2];     * Variable size 
  560. ;        unsigned long    modelDescASCIICount;         * the count of "bytes" 
  561. ;        unsigned char    modelDescASCIIName[2];         * Variable size 
  562. ;        unsigned long    modelDescUniCodeCode;         
  563. ;        unsigned long    modelDescUniCodeCount;         * the count of characters, each character has two bytes 
  564. ;        unsigned char    modelDescUniCodeName[2];     * Variable size 
  565. ;        short            modelDescScriptCodeCode;     
  566. ;        unsigned char    modelDescScriptCodeCount;     * the count of "bytes" 
  567. ;        SInt8            filler;                         * For proper alignment across languages 
  568. ;        unsigned char    modelDescScriptCodeName[2];     * Variable size 
  569. ;    }    profileDescription[1];                         
  570. ;
  571.  
  572.  
  573. ;  Under color removal, black generation type 
  574. CMUcrBgType                RECORD 0
  575. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'bfd  ' 
  576. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  577. ucrCount                 ds.l    1                ; offset: $8 (8)        ;  Number of UCR entries 
  578. ucrValues                 ds.w    1                ; offset: $C (12) <-- really an array of length one ;  variable size 
  579. bgCount                     ds.l    1                ; offset: $E (14)        ;  Number of BG entries 
  580. bgValues                 ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  variable size 
  581. ucrbgASCII                 ds.b    1                ; offset: $14 (20) <-- really an array of length one ;  null terminated ASCII string 
  582.                          ORG 22
  583. sizeof                     EQU *                    ; size:   $16 (22)
  584.                         ENDR
  585. CMIntentCRDVMSize        RECORD 0
  586. renderingIntent             ds.l    1                ; offset: $0 (0)        ;  rendering intent 
  587. VMSize                     ds.l    1                ; offset: $4 (4)        ;  VM size taken up by the CRD 
  588. sizeof                     EQU *                    ; size:   $8 (8)
  589.                         ENDR
  590. CMPS2CRDVMSizeType        RECORD 0
  591. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'psvm' 
  592. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  593. count                     ds.l    1                ; offset: $8 (8)        ;  number of intent entries 
  594. intentCRD                 ds        CMIntentCRDVMSize ; offset: $C (12) <-- really an array of length one ;  variable size 
  595. sizeof                     EQU *                    ; size:   $14 (20)
  596.                         ENDR
  597. ;  Video Card Gamma type 
  598.  
  599. cmVideoCardGammaTableType        EQU        0
  600. cmVideoCardGammaFormulaType        EQU        1
  601.  
  602. CMVideoCardGammaTable    RECORD 0
  603. channels                 ds.w    1                ; offset: $0 (0)        ;  # of gamma channels (1 or 3) 
  604. entryCount                 ds.w    1                ; offset: $2 (2)        ;  1-based number of entries per channel 
  605. entrySize                 ds.w    1                ; offset: $4 (4)        ;  size on bytes of each entry 
  606. data                     ds.b    1                ; offset: $6 (6) <-- really an array of length one ;  variable size data follows 
  607.                          ORG 8
  608. sizeof                     EQU *                    ; size:   $8 (8)
  609.                         ENDR
  610. CMVideoCardGammaFormula    RECORD 0
  611. redGamma                 ds.l    1                ; offset: $0 (0)        ;  must be > 0.0 
  612. redMin                     ds.l    1                ; offset: $4 (4)        ;  must be > 0.0 and < 1.0 
  613. redMax                     ds.l    1                ; offset: $8 (8)        ;  must be > 0.0 and < 1.0 
  614. greenGamma                 ds.l    1                ; offset: $C (12)        ;  must be > 0.0 
  615. greenMin                 ds.l    1                ; offset: $10 (16)        ;  must be > 0.0 and < 1.0 
  616. greenMax                 ds.l    1                ; offset: $14 (20)        ;  must be > 0.0 and < 1.0 
  617. blueGamma                 ds.l    1                ; offset: $18 (24)        ;  must be > 0.0 
  618. blueMin                     ds.l    1                ; offset: $1C (28)        ;  must be > 0.0 and < 1.0 
  619. blueMax                     ds.l    1                ; offset: $20 (32)        ;  must be > 0.0 and < 1.0 
  620. sizeof                     EQU *                    ; size:   $24 (36)
  621.                         ENDR
  622. CMVideoCardGamma        RECORD 0
  623. tagType                     ds.l    1                ; offset: $0 (0)
  624. table                     ds        CMVideoCardGammaTable ; offset: $4 (4)
  625.                          ORG 4
  626. formula                     ds        CMVideoCardGammaFormula ; offset: $4 (4)
  627. sizeof                     EQU *                    ; size:   $28 (40)
  628.                         ENDR
  629. CMVideoCardGammaType    RECORD 0
  630. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'vcgt' 
  631. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  632. gamma                     ds        CMVideoCardGamma ; offset: $8 (8)
  633. sizeof                     EQU *                    ; size:   $30 (48)
  634.                         ENDR
  635. ; ***********************************************************************
  636. ; *************** ColorSync 1.0 profile specification *******************
  637. ; ***********************************************************************
  638.  
  639. cmGrayResponse                    EQU        0
  640. cmRedResponse                    EQU        1
  641. cmGreenResponse                    EQU        2
  642. cmBlueResponse                    EQU        3
  643. cmCyanResponse                    EQU        4
  644. cmMagentaResponse                EQU        5
  645. cmYellowResponse                EQU        6
  646. cmUcrResponse                    EQU        7
  647. cmBgResponse                    EQU        8
  648. cmOnePlusLastResponse            EQU        9
  649.  
  650. ;  Device types 
  651.  
  652. cmMonitorDevice                    EQU        'mntr'
  653. cmScannerDevice                    EQU        'scnr'
  654. cmPrinterDevice                    EQU        'prtr'
  655.  
  656. CMIString                RECORD 0
  657. theScript                 ds.w    1                ; offset: $0 (0)
  658. theString                 ds        Str63            ; offset: $2 (2)
  659. sizeof                     EQU *                    ; size:   $42 (66)
  660.                         ENDR
  661. ;  Profile options 
  662.  
  663. cmPerceptualMatch                EQU        $0000                ; Default. For photographic images 
  664. cmColorimetricMatch                EQU        $0001                ; Exact matching when possible 
  665. cmSaturationMatch                EQU        $0002                ; For solid colors 
  666. ;  Profile flags 
  667.  
  668. cmNativeMatchingPreferred        EQU        $00000001            ; Default to native not preferred 
  669. cmTurnOffCache                    EQU        $00000002            ; Default to turn on CMM cache 
  670. ; typedef long                             CMMatchOption
  671.  
  672. ; typedef long                             CMMatchFlag
  673.  
  674. CMHeader                RECORD 0
  675. size                     ds.l    1                ; offset: $0 (0)
  676. CMMType                     ds.l    1                ; offset: $4 (4)
  677. applProfileVersion         ds.l    1                ; offset: $8 (8)
  678. dataType                 ds.l    1                ; offset: $C (12)
  679. deviceType                 ds.l    1                ; offset: $10 (16)
  680. deviceManufacturer         ds.l    1                ; offset: $14 (20)
  681. deviceModel                 ds.l    1                ; offset: $18 (24)
  682. deviceAttributes         ds.l    2                ; offset: $1C (28)
  683. profileNameOffset         ds.l    1                ; offset: $24 (36)
  684. customDataOffset         ds.l    1                ; offset: $28 (40)
  685. flags                     ds.l    1                ; offset: $2C (44)
  686. options                     ds.l    1                ; offset: $30 (48)
  687. white                     ds        CMXYZColor        ; offset: $34 (52)
  688. black                     ds        CMXYZColor        ; offset: $3A (58)
  689. sizeof                     EQU *                    ; size:   $40 (64)
  690.                         ENDR
  691. CMProfileChromaticities    RECORD 0
  692. red                         ds        CMXYZColor        ; offset: $0 (0)
  693. green                     ds        CMXYZColor        ; offset: $6 (6)
  694. blue                     ds        CMXYZColor        ; offset: $C (12)
  695. cyan                     ds        CMXYZColor        ; offset: $12 (18)
  696. magenta                     ds        CMXYZColor        ; offset: $18 (24)
  697. yellow                     ds        CMXYZColor        ; offset: $1E (30)
  698. sizeof                     EQU *                    ; size:   $24 (36)
  699.                         ENDR
  700. CMProfileResponse        RECORD 0
  701. counts                     ds.w    9                ; offset: $0 (0)
  702. data                     ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  Variable size 
  703. sizeof                     EQU *                    ; size:   $14 (20)
  704.                         ENDR
  705. CMProfile                RECORD 0
  706. header                     ds        CMHeader        ; offset: $0 (0)
  707. profile                     ds        CMProfileChromaticities ; offset: $40 (64)
  708. response                 ds        CMProfileResponse ; offset: $64 (100)
  709. profileName                 ds        CMIString        ; offset: $78 (120)
  710. customData                 ds.b    1                ; offset: $BA (186) <-- really an array of length one ;  Variable size 
  711.                          ORG 188
  712. sizeof                     EQU *                    ; size:   $BC (188)
  713.                         ENDR
  714. ; typedef struct CMProfile *            CMProfilePtr
  715.  
  716. ; typedef CMProfilePtr *                CMProfileHandle
  717.  
  718.     IF OLDROUTINENAMES THEN
  719.  
  720. kCMApplProfileVersion            EQU        $00000100
  721.  
  722. grayResponse                    EQU        0
  723. redResponse                        EQU        1
  724. greenResponse                    EQU        2
  725. blueResponse                    EQU        3
  726. cyanResponse                    EQU        4
  727. magentaResponse                    EQU        5
  728. yellowResponse                    EQU        6
  729. ucrResponse                        EQU        7
  730. bgResponse                        EQU        8
  731. onePlusLastResponse                EQU        9
  732.  
  733. rgbData                            EQU        'RGB '
  734. cmykData                        EQU        'CMYK'
  735. grayData                        EQU        'GRAY'
  736. xyzData                            EQU        'XYZ '
  737.  
  738. monitorDevice                    EQU        'mntr'
  739. scannerDevice                    EQU        'scnr'
  740. printerDevice                    EQU        'prtr'
  741. ; typedef unsigned short                 XYZComponent
  742.  
  743. XYZColor                RECORD 0
  744. f                         ds        CMXYZColor
  745. sizeof                     EQU *                    ; size:   $6 (6)
  746.                         ENDR
  747.  
  748.  
  749. ; typedef unsigned short                 CMResponseData
  750.  
  751. IString                    RECORD 0
  752. f                         ds        CMIString
  753. sizeof                     EQU *                    ; size:   $42 (66)
  754.                         ENDR
  755.  
  756.  
  757. ; typedef long                             CMResponseColor
  758.  
  759. ; typedef CMResponseColor                 responseColor
  760.  
  761.     ENDIF    ; OLDROUTINENAMES
  762.  
  763.     ENDIF ; __CMICCPROFILE__ 
  764.  
  765.